implementing heap, syncfinder_astar