first simple solution: add the memoization feature directly inside the Discounter class