finish ex 5.6.4