QuadTree with stackoverflow