re-writing the rtree for n-dimensional space