model implementation.