cachematrix.R with modified functions for inverse matrix caching