refactoring main
refactoring main