Create function combine lines

Create function combine lines for left and right diraction