memoization finish