generator for model and controller