working valid move checking