20140917: HW4 complete, need to double check it before submitting.