moved rectangles into groups