Modification of the cachematrix.R