creating and updating the fields in the model