Adding HW3
Revised and final version.