Implement ch3.3.1's examples