memoization and classic logs.