fix freqs calculation using bisection method