completed solution of ex 5
small correction on the exercise sheet