refactor bootstrap