Expanded stub file to compute matrix inverse using caching methods