updated template on newest state