caching the inverse of a Matrix