refactoringmain