refactoring Mains