implementing inverse matrix caching