completed CacheMatrix.R file