Modify the original R code with the funtions to cache the matrix
inversion