tried implementing valid move check