   return 1;
 }
 
-int setCalibration(int tap, int val)
+int setPulseCount(int tap, int val)
 {
   if(tap == 0)
   {
-    T0.maxPulseCount = val;
+    T0.pulseCount = val;
   }
   else if(tap == 1)
   {
-    T1.maxPulseCount = val;
+    T1.pulseCount = val;
   }
   else if(tap == 2)
   {
-    T2.maxPulseCount = val;
+    T2.pulseCount = val;
   }
   writeToEEPROM();
   return 1;
 }
 
+int setCalibration(int tap, int val)
+{
+  if(tap == 0)
+  {
+    T0.maxPulseCount = val;
+  }
+  else if(tap == 1)
+  {
+    T1.maxPulseCount = val;
+  }
+  else if(tap == 2)
+  {
+    T2.maxPulseCount = val;
+  }
+  writeToEEPROM();
+  return 1;
+}
+
 void pinValT0()
 {
   T0.previousFlowing = T0.flowing;
-  if(digitalRead(T0.flowPin) == HIGH)
+  if(digitalRead(FLOW_PIN_T0) == HIGH)
   {
     if(flowTapPin0Value == 0)
     {

void pinValT2()
{
  T2.previousFlowing = T2.flowing;
  if(digitalRead(T2.flowPin) == HIGH)
  {
    if(flowTapPin2Value == 0)
    {

  }
  else if(command.equals("setCalibration"))
  {
    //set the calibration value (maxPulseCount)
    //args[1] == tap you want to set (0-3)
    //args[2] == calibration value (total number of pulses in a keg)
    setCalibration(args[1].toInt(), args[2].toInt());
  }
  else if(command.equals("setPulseCount"))
  {
    //set the pulseCount for a tap manually
    //args[1] == tap you want to set (0-3)
    //args[2] == calibration value (total number of pulses in a keg)
    setPulseCount(args[1].toInt(), args[2].toInt());
  }

  return 1;
