solve padding with bounding box instead