fixed some bugs
Merge branch 'hw4_partA' of https://github.com/sinflood/w4118_hw2 into hw4_partA