Added memoization, stochastic memoizer
Memoization