Added template solutions for exercise 5