 }
 
 void fft_phase(float fs, float f1, float f2, uint16_t samples, const float data[],
-						uint32_t mag[], float phase[], uint16_t &startIndex, uint16_t &endIndex)
+						float mag[], float phase[], uint16_t &startIndex, uint16_t &endIndex)
 {
 	//changes f1 and f2 to indices
 	//fs/samples gives the increments of frequency on the x-axis

	
	for (uint16_t i = startIndex; i < endIndex; i++)
	{
		signed long int real = 0;
		signed long int imag = 0;
		
		
		//Euler's Identity

		//dividing each number by 1000 to prevent each number from getting too large
		//Also adjusts for the fact that the trigonometric values were multiplied
		//by 1000 as well to make them integers instead of decimal values
		real = real / 1000 / samples;
		imag = imag / 1000 / samples;
		
                float phaseRad = atan2(imag, real) + PI;
		
		//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));
		phase[i] = phaseRad;
	}
}
