ex29 finished
all functions in their own files