 		
                 float phaseRad = atan2(imag, real);
 		
-		//calculating magnitude of the data by taking the square root of the
-		//sum of the squares of the real and imaginary component of each signal
-                mag[i] = log2(sqrt(real * real + imag * imag));
+                // mag[i] = log2(sqrt(real * real + imag * imag));
+                mag[i] = sqrt(real * real + imag * imag);
 		phase[i] = phaseRad;
 	}
 }

    //}

    _old_max_index = maxIndex;
}



          float value = acc / ACC_SIZE;
          acc = 0;
          numInAcc = 0;
          addToFFT(value);
          // addToFFT(value);
      }

