Implmented range functionality into KDTree