took out memoization