new approach for templates