Rotate code copied.