added dialog support