added rotation conversion function