refactoring bootstrap.sh