Astar optimalization #3