Setting up if else statements for alerts