email alerts not entirely functional