add Ex1 to Ex5 from chapter1