HW4: problem 2 model.