edited function cacheMatrix.R