solved up to exercise 9 from text-files