add rand func of quaternions