finished HW 2.2