       smallest_peak=20000;
       smallest_peak_index=0;
       for (int j = 0; j<number_of_peaks;j++){
-           if(dB3[biggest_peaks[j]]<smallest_peak){
-            smallest_peak = dB3[biggest_peaks[j]];
+           if(peak_power[biggest_peaks[j]]<smallest_peak){
+            smallest_peak = peak_power[biggest_peaks[j]];
             smallest_peak_index = j;
            }
       }
-      smallest_max_peak = dB3[biggest_peaks[smallest_peak_index]];  
-    }
-  }
-}
-
-
-
-
+      smallest_max_peak = peak_power[biggest_peaks[smallest_peak_index]];  
+    }
+  }
+}
+
+
+
+

void print_peaks(){ 
    Serial.println("3dB Bandwidth:");
    for(int i = 0 ; i < FFT_N/2; i++){
      Serial.print(dB3[i]);
      Serial.print(",");
    }
    Serial.println("");

    //SEND DATA TO ARDUINO-ARDUINO INTERFACE
    //NEED INPUT FROM JIM HERE

//      is_microphone = true; //set to microphone mode
//      down_sampling_rate =1;// microphone mode 

    //TIME DUPLEX BETWEEN MICROPHONE AND VIBRATION SENSOR
    if (is_microphone == true){
      is_microphone = false; //set to vibration mode
      down_sampling_rate =20;//vibration mode uses downsampling factor 20
    }else{
      is_microphone = true; //set to microphone mode
      down_sampling_rate =1;// microphone mode 
    }



