added support for rotation