forgot to update writeTemplate() also