Implemented KDTree & spec