add a new method `compare`
Merge pull request #25 from Starcounter-Jack/compare

add a new method `compare`