update data change function