templates implemented