refactor set model in MainRoute