changed the way templates