modified the dialogue model