Update HW1

Fixed some bugs...
Merge pull request #1 from chongzizil/master

Update HW1