change cmp's interface to return simply a pair of integers