add dialog and update