changed the code of cachematrix.R