implements template