added cacheMatrix