merge intersecting rects