inserted R code to cachematrix.R