fix test-line function