Should be done with porting AStar