fixed #6 & add test case
Merge pull request #8 from miniflycn/dev

fixed #6 & add test case