Added alert functionality