Updated cacheMatrix.R with function body