fixed project2 bugs referred in TA review.