refactor the bootstrap