Implemented the model