isLeftOverlap and isRightOverlap methods are added