added tests and documentation for rotate method