Making tests passed
Merge pull request #1 from linzhp/master

Tests passed.

Note: this version is better than the one I pushed. Therefore, I am accepting this PR.