end of homework 2 exercise 2