Finish exercises 5.15 and 5.16