exercise 12 using functions and date