exercise_6 revised