hw2done, fixed a bug