working on getAllMoves() method