added support for general popup dialog