Added TR_xor2, still needs chekcing though