rotating all the rectangle