building the model