use a dialog element instead of reimplementing it in a window element