simplify recursive caching
merge it