modified cachematrix script for inverse matrix.