added everything of NN and Astar