add another solution for the exercise 71