binary motor hover code refactored