update record with update function instead of set func