caching matrix solve