hw6 complete, closes #7