how to update data using model