Modified cacheMatrix.R