add plot_data() and print_to_file()