modify finish, alertdialog