refactored to modularize bob.py