added testCacheMatrix function