improve the method for build the shortest way from point of interest