update terms code