write a dialog