Exersice 3 amended