spectral_hk

here the improved version