update data code