update based on template