template file revised