finish ch5, including exercise