caching inverse of matrix solution