Wrote personal cacheMatrix func