CHANGED:applied the possibleMoves func