update end-position