udate cachematrix.R with caching inverse functionality