added functionality to move with distance conditionals