AddDialog: has been rewritten