before compare A and B