Implement ch2.1.1's examples