making mazesolver OO