 monitor_t monitorData[MONITOR_POINTS];
 int monitorCursor = 0;
 int monitorSize = 0;
-const int DATA_ENTRIES = 30; // size of /data rpt; must be <= MONITOR_POINTS
+const int DATA_ENTRIES = 4; // size of /data rpt; must be <= MONITOR_POINTS
 void updateSensorData(monitor_t *monitorData);
 void postSensorData(monitor_t *monitorData);
 void printMonitorEntry(monitor_t m, String* buf);
-void jsonMonitorEntry(monitor_t *m, String* buf);
+void formatMonitorEntry(monitor_t *m, String* buf, bool JSON);
 
 /////////////////////////////////////////////////////////////////////////////
 // temperature sensor stuff /////////////////////////////////////////////////

    j <= DATA_ENTRIES && j <= monitorSize;
    i--, j++
  ) {
    jsonMonitorEntry(&monitorData[i], &toSend);
    toSend += "\n";
    if(i == 0)
      i = MONITOR_POINTS;

  Serial.println("");
  return;
}
void formatMonitorEntry(monitor_t *m, String* buf, bool JSON) {
  if(JSON) buf->concat("{ ");
  buf->concat("\"timestamp\": ");
  buf->concat(m->timestamp);
  if(GOT_TEMP_SENSOR){
    buf->concat(", \"waterTemp\": ");
    buf->concat(m->waterCelsius);
    if(! JSON) buf->concat("\tC");
  }
  if(GOT_HUMID_SENSOR){  
    buf->concat(", \"airTemp\": ");
    buf->concat(m->airCelsius);
    if(! JSON) buf->concat("\tC");
    buf->concat(", \"humidity\": ");
    buf->concat(m->airHumid);
    if(! JSON) buf->concat("\t%RH");
  }
  if(GOT_LIGHT_SENSOR){
    buf->concat(", \"light\": ");
    buf->concat(m->lux);
    if(! JSON) buf->concat("\tlux");
  }
  if(GOT_PH_SENSOR){
    buf->concat(", \"pH\": ");
    if(! JSON) buf->concat("\t ");
    buf->concat(m->pH);
  }
  if(GOT_LEVEL_SENSOR){
    buf->concat(", \"waterLevel1\": "); buf->concat(m->waterLevel1);
    if(! JSON) buf->concat("\tcm");
    buf->concat(", \"waterLevel2\": "); buf->concat(m->waterLevel2);
    if(! JSON) buf->concat("\tcm");
    buf->concat(", \"waterLevel3\": "); buf->concat(m->waterLevel3);
    if(! JSON) buf->concat("\tcm");
  }
  if(JSON) {
    buf->concat(" }");
  } else { // remove quotes and commas
    buf->replace('"', ' ');
    buf->replace(',', '\n');
    buf->replace(':', '\t');
    buf->concat("\n");
  }
}
void getTemperature(float* waterCelsius) {
  tempSensor.requestTemperatures(); // send command to get temperatures
