image rotation and re-layout added