added test for rotate method
added rotate method