basic kdtree implement go a step further.