copied over dialog box function from burger bar