modification for R-Tree based