Added bounding box calculations