beginning middle replace this not this and this end