file modified for caching the inverse of matrix (Assignment 2)