1. add some code from point-to-offer book