Implement ch3.2.1's examples