template improved