write to file
hw4 part1