debugging finishes for KDTree and naive computation