changed kMatValues type to double