refactoring: write -> print_text