Add rotation and scaling function