refactoring bootstrap