Changed the way the functions operate the spectrometer