solved cacheMatrix