Determination of harmful substances