added rtree functionality