CacheMatrix.R solved