added functionality to rotate Elements