refactored survey.py and created  demo notebook