Sam does the work for HW7.