refactored moves and improved tests