working on rotate method