refactored bootstrap