Wrote homework 8 for 671