discipline model, controller and tests