change freqUsed to be samplingRate