Homework 5: exercise 2 done