added endOfMaze due to merge probs