periodogram works, but very slow