finish example 5.6.