update template when change