a bit closer to quadtree