hw4 finished, fix several bugs