Adding a dynamic dialog box