added spectral search function