update anchor position calculation