moved line builder out and simple tests