update set logic