solving maze with A* search algorithm