added inverse matrix cache code