successfully build kd-tree