made sure borders of rects overlap