add line index to output
merge?