upload the new cachematrix function