   digitalWrite(ledPin, LOW);
   // XBee.begin(9600);
   // XBeePacketCounter = 0;
-  pressed = false;
-  released = false;
-  last_release_time = 0;
+
+  
   delay(300);
   Serial.println("system begins");
 }
 
 void loop() {
-  // monitor the user input all the time
-  // so everytime when loop executes, or at least in some states
-  // we will see the results
   
-  // g = sliderEvent(&changes, 0);
-  g = sliderEvent2(&sliderDelta, &sliderVal);
+  g = sliderEvent(&sliderDelta, &sliderVal);
   if (g!= 0) {
     printGesture(g);
   }
-  // Serial.println(g);
   
   delay(10);
 }
 
-gesture_t sliderEvent2(int* sDelta, int* sVal) {
+gesture_t sliderEvent(int* sDelta, int* sVal) {
   softpotReading = analogRead(softpotPin);
   // DEBUG_PRINTLN(softpotReading);
   if(softpotReading > SOFTPOT_THREASHOLD ) { // currently not pressed



#define DEBUG
#include "slider.h"

int sliderVal = 0;
int sliderDelta = 0;
int sliderState = 0;


void setup()
