started adding A* algorithm