rewrote match-cmp; but it doesn't handle atoms correctly anymore