HW2_version 2.

According to the comments, rewrite some code and style.