updated the path finding so that it uses a A* algorith approach