adjusted bootstrap.py