Added the rotation and scaling functionality