solutions to exercises of chapter flow_control