update movable position algorithm