added options -f and -r (replace FREQ_MIN and FREQ_MAX*2)