done exercise 3.5.1
done exercise 3.5.2