add support for A* search algorithm with heuristic function