updated cacheMatrix.R with 2 functions