wrote code to implement caching of inverse matrix functionality