solved ex2.2 c. updated template