update cachematrix script