kdTree: Working version1.1