procedures in template