simplified logic for rotation and movement