implemented "rotate in place" functionality