updated cacheMatrix.R file