refactorin: write_line -> print_text_line