my first draft of cache inverse matrix