finish chapter1_exercise