added code to 2dialog. Working.