Memoization

Appry memoization