Implement ex4.2.1's examples