adding the create_template function