moved back to the old algorithm for movement.