apply alert dialog