Had to redo code for alert dialog