Memoization first draft