add tests for lines
add tests and simplify line()