thread to update data