refactored the bootstrap script