changes in basic structure, adding a memoization chapter