exported createLine-function to own function