memoization style changes