added rotation functional