added rotating of images