refactoring euler angles