Implementing overlap for bounding box.