from_file of exercise 17 v2