cleaned dialog.py