improved bounding box