added delete dialog and used events