implement bounding box