merge rotate pieces