       pelletCounted[inputNum] = true;
     }
   }
-  else if (PIStates[inputNum] == 1) {
+  else if (PIStates[inputNum] == 1) { //if still empty, same as last time
     if (countMe[inputNum] && lastTime[inputNum] >= 8) {
-      pelletCount[inputNum]++;
+      pelletCount[inputNum]++; //counts pellet
       Serial.println(F("Pellet taken"));
       Serial.print(F("Pellets of type #"));
       Serial.print(String(inputNum + 1));

    lastTime[inputNum] = 0;
  }
  
  else  { //if PIStates == 0
    //pellet still there, do nothing
    lastStates[inputNum] = PIStates[inputNum];
    lastTime[inputNum] = 0;

  return true;
}

//code for moving motors
void moveMotor(int motorNum)
{
    const int backMotion = 6; //fraction of the motion for which to move backwards (6 -> 1/6th)**
    power_twi_enable();
    if (motorNum == 0) //for moving first motor
    {
      motor1->step(STEPS_TO_INCREMENT/backMotion,BACKWARD,DOUBLE);
      motor1->step(STEPS_TO_INCREMENT,FORWARD,DOUBLE);
      motor1->release();
    }
    else if (motorNum == 1) //for moving second motor
    {
      motor2->step(STEPS_TO_INCREMENT/backMotion,BACKWARD,DOUBLE);
      motor2->step(STEPS_TO_INCREMENT,FORWARD,DOUBLE);
      motor2->release();
    }
    power_twi_disable();
}


//-------------------------anything after this probably shouldn't be changed-----------------------

//code for entering sleep mode
void enterSleep()
{
  Serial.println(F("Going to sleep.")); delay(50);
