 
   if (client.connect()) {
     Serial.println("connected");
-    client.println("GET /api/search.json?topic=fail HTTP/1.0");
+
+    char topicToAnalyze[] = "fail";
+
+    String request = "GET ";
+    //use yahoo yql web api to do the numbercrunching - arduino is too slow to process tweet sentiments results locally (70s+)
+    request += "http://query.yahooapis.com/v1/public/yql?q=SELECT%20positive,%20negative,%20neutral%20FROM%20json%20WHERE%20url%20%3D%20%22http://data.tweetsentiments.com:8080/api/search.json%3Ftopic%3D";
+    request += topicToAnalyze;
+    request += "%22&format=json";
+    request += " HTTP/1.0";
+    Serial.println( request );
+    // do the HTTP GET request
+    client.println( request );		
     client.println();
-    delay(1000);
+ 
   } else {
     Serial.println("connection failed");
   }

}

void loop() {
  char sum=0, led_red=0, led_green=0, led_blue=0;
  if (client.available()) {
    
    if(client.find("neutral\":")){
      char buf[4];
      client.readBytes(buf, 3);
      blue = atoi(buf);

      Serial.println(blue);
    }
    
    client.stop();
    
    if(valueFound){
    sum = red+green+blue;
    if (sum != 0){    
      led_red = (255*(red*1.0/sum));
      led_green = (255*(green*1.0/sum));
      led_blue = (255*(blue*1.0/sum));
    }
    }
    
     // set the brightness of the LED:
