merge output lines