another version of compare