add CX algorithm