more bootstrap script refactoring