Finished version of HW1.