ex20 pertains to using functions and reading out files