completed the cacheMatrix functions