Add the test code
Fix the test failures
Merge pull request #1 from elvis-liu/master

merge with the fixed code