Contaminant Detection Logic