bootstrap refactoring