remove swap_AB_if_beneficial(), now before keypair