MRH added code to complete the cached matrix inversion