added rotating of figures