   vehiclesNSThread.check();
   vehiclesEWThread.check();
   vehicleRemovalThread.check();
+  signalThread.check();
 
   vehicleEWState = digitalRead(vehicleEW);
   vehicleNSState = digitalRead(vehicleNS);

  }
}

void changeEWGreenToAmber() {
  if (timeSinceStart - previousTimeSinceStart > minimumGreenLight) {
    Serial.println("Vehicle EAST-WEST direction. Changing signal EAST-WEST to green");

    //change NS to amber

    previousTimeSinceStart = timeSinceStart;
  }
  else {
    //limit printing
    long remainingTime =  (minimumNSGreenLight - (timeSinceStart - previousTimeSinceStart)) / long(1000);
    if (remainingTime % 3 == 0) {      //if waiting for green light
      //if waiting for green light
      Serial.print("Time left for changing EAST WEST to green in : ");
      Serial.print(remainingTime);
      Serial.println("s");
    }
  }
}

void changeEWGreenToAmber() {
  if (timeSinceStart - previousTimeSinceStart > minimumEWGreenLight) {
    Serial.println("Vehicle NORTH-SOUTH direction. Changing signal NORTH-SOUTH to green");

    //change EW to amber
