refactoring: using print_text and print_error from terminal module