runs, solves most mazes, but has a restore function bug