template completion