update data and model