 
 WiFiClient client;
 
+// checking connection
 unsigned long lastConnectionTime = 0;
 boolean lastConnected = false;
 const unsigned long postingInterval = 10*1000; // wait 10 seconds
 boolean canConnect = false;
 
+// setting time
+unsigned int localPort = 2390;      // local port to listen for UDP packets
+const int TIMEZONE = -6;            // central standard time
+// const int TIMEZONE = -5;         // central daylight time
+IPAddress timeServer(129, 6, 15, 28); // time.nist.gov NTP server
+const int NTP_PACKET_SIZE = 48;
+byte packetBuffer[NTP_PACKET_SIZE];
+WiFiUDP Udp;
+char time_as_string[] = "12/20/1969 00:00:00";
+
 const int redLed = 3;
 const int greenLed = 5;
 const int yellowLed = 6;
-
 
 void setup() {
   // Initial LEDs

/*** RouterReset: test if internet is working; if not, reset router
***/

#include <SPI.h>
#include <WiFi.h>

// private info [made generic here]
char ssid[] = "SSID";

    digitalWrite(yellowLed, HIGH);
    connect_to_server();
    digitalWrite(yellowLed, LOW);

    Serial.print("Current time: ");
    time_to_string(now(), time_as_string);
    Serial.println(time_as_string);
  }

  lastConnected = client.connected();
  if(canConnect) {
    digitalWrite(greenLed, HIGH);
