Update the function of cachematrix.R