splitBbox function