simplify memoize hierarchy