entity movement refactored