first working version of spectral search