renamed index to freqbin to avoid collision