Add pair_join function and use it in the transformer