add buildmapTree func but not complete, add findleastsim func and it completed