finished the model layer