added BFS for finding valid moves