ex14 writing and using functions