replace | by \n and vice versa implemented