Add comparator
Merge pull request #1 from xudafeng/master

Add comparator