change the logic of bounding box creation (from big box to grid)