updating cachematrix.R file