added rotate method