moved dialog to new c file