got rid of alerts and added popups for error messages instead