added method for detecting if 2 bounding boxes are overlapping