update homework 7 with changes from homework 6