cacheing the inverse of a matrix