times 16 was a bad idea. Overshot frequency and got integer divisions of the frequency. Changed algorithm to times 2