added spectrum_pi function.  sorry!