Filled in two functions for caching inverse of a matrix