Made generic astar