added quaternion approach