How to merge the two pipe branches