Added bounding box function