add alert and confirm dialog