refactoring startup