Nitrates monitoring by UV–vis spectral analysis