have method-based memoization, untested