making matix to set quaterians from