 
 //here are the possible modes the thermostat can be in: off/heat/cool
 #define MODE_OFF "Off"
-#define MODE_HEAT "Heating"
-#define MODE_COOL "Cooling"
-String externalMode = MODE_HEAT;
-String internalMode = MODE_HEAT;
+#define MODE_HEAT "Winter"
+#define MODE_COOL "Summer"
+String externalMode = MODE_OFF;
+String internalMode = MODE_OFF;
 bool modeButtonClick = false;
 elapsedMillis modeButtonClickTimer;
+
+//here are the possible states of the thermostat
+#define STATE_INIT "Initializing"
+#define STATE_IDLE "Idle"
+#define STATE_HEATING "Heating"
+#define STATE_COOLING "Cooling"
+#define STATE_FAN_ON "Fan On"
+#define STATE_OFF "Off"
+#define STATE_PULSE_HEAT "Pulse Heat"
+#define STATE_PULSE_COOL "Pulse Cool"
+String state = STATE_INIT;
 
 //TESTING_HACK
 // this allows me to system test the project

//enable the user code (our program below) to run in parallel with cloud connectivity code
// source: https://docs.particle.io/reference/firmware/photon/#system-thread
//SYSTEM_THREAD(ENABLED);

/*******************************************************************************
 * Function Name  : setup

 * Description    : turns the cooling element on until the desired temperature is reached
 *******************************************************************************/
void coolingEnterFunction(){
  //set the state
  setState(STATE_COOLING);

  Particle.publish(PUSHBULLET_NOTIF_PERSONAL, "Cool on" + getTime(), 60, PRIVATE);
  myDigitalWrite(fan, HIGH);
  myDigitalWrite(heat, LOW);
