add solution for exercise on templates