worked on stat840 hw6