caching an inverse of a matrix