model2 and model3 - TODO: move most of model3 into a module