add our own sane version of compare