added rectangles mode