Function updated to for Caching the Inverse of a Matrix