error in rotate