refactoring the base of project with models