history model, controller and tests