Code for the OCW course 6-006