Solved Exercice 1.5.2 with hash