add min/max to CmpRef
change Match#of signature