add homework solutions from class 4 file IO