add code for exercice 4.2