     }
   }
   
-  msg = aJson.getObjectItem(data, GREEN);
-  if (msg != NULL) {
-    if(strcmp(msg->valuestring, ON) == 0){
+  color = aJson.getObjectItem(msg, GREEN);
+  if (color != NULL) {
+    if(strcmp(color->valuestring, ON) == 0){
       Serial.println("green off");
       digitalWrite(GREENLED, HIGH);
     }else{

void loop(){
  //need to call monitor to check for new data on ethernet
  skynetclient.monitor(); 
}


}

aJsonObject *msg, *color;

void onMessage(aJsonObject *data){
  //print your message
  Serial.println(aJson.print(data));
  
  //or parse it
  msg = aJson.getObjectItem(data, MESSAGE);
  Serial.println(aJson.print(msg));
  
  color = aJson.getObjectItem(msg, RED);
  if (color != NULL) {
    if(strcmp(color->valuestring, ON) == 0){
      Serial.println("red on");
      digitalWrite(REDLED, HIGH);
    }else{
