kdtree comments added