minor refactoring on bootstrapping