update the way templates work