update DialogManager, createDialog now returns Dialog