added edit dialog and refactored addEditDialog