updated dialogue.py