compare A with B