Controlling Multiple Relays, input firing all pins assigned to specific time

my objective is to have three different buttons (1, 2, 3) to each control one relay.

button #1 (input pin A1 or 15) gets pushed for at least 100ms to trigger the set pin on relay one (output pin 5)
button #1 (input pin A1 or 15) gets pushed for at least 500ms to trigger the unset pin on relay one (output pin 6)

button #2 (input pin A2 or 16) gets pushed for at least 100ms to trigger the set pin on relay two (output pin 9)
button #2 (input pin A2 or 16) gets pushed for at least 500ms to trigger the unset pin on relay two (output pin 10)

button #3 (input pin A3 or 17) gets pushed for at least 100ms to trigger the set pin on relay three (output pin 11)
button #3 (input pin A3 or 17) gets pushed for at least 500ms to trigger the unset pin on relay three (output pin 12)

as it stands this code works, for any single set of input and output. but fires both pin 5 and 9 if button 1 or button 2 is pressed for 100ms and 6 & 10. if button 1 or 2 is held for more than 500ms then 6

/*Using a Single Button, create mutliple options based on how long the button is pressed
 



/////////Declare and Initialize Variables////////////////////////////

//We need to track how long the momentary pushbutton is held in order to execute different commands
//This value will be recorded in seconds
float pressLength_milliSeconds = 0;

// Define the *minimum* length of time, in milli-seconds, that the button must be pressed for a particular option to occur
int optionOne_milliSeconds = 100;
int optionTwo_milliSeconds = 500;        

//The Pin your button is attached to
int buttonPin2 = 16;

//Pin your LEDs are attached to
int ledPin_Option_3 = 9;
int ledPin_Option_4 = 10;

void setup(){

  // Initialize the pushbutton pin as an input pullup
  // Keep in mind, when pin 2 has ground voltage applied, we know the button is being pressed
  pinMode(buttonPin2, INPUT_PULLUP);     

  //set the LEDs pins as outputs
  pinMode(ledPin_Option_3, OUTPUT); 
  pinMode(ledPin_Option_4, OUTPUT); 

  //Start serial communication - for debugging purposes only
  Serial.begin(9600);                                     

} // close setup


void loop() {

  //Record *roughly* the tenths of seconds the button in being held down
  while (digitalRead(buttonPin2) == LOW ){ 

    delay(100);  //if you want more resolution, lower this number 
    pressLength_milliSeconds = pressLength_milliSeconds + 100;   

    //display how long button is has been held
    Serial.print("ms = ");
    Serial.println(pressLength_milliSeconds);

  }//close while


  //Different if-else conditions are triggered based on the length of the button press
  //Start with the longest time option first

  //Option 4 - Execute the second option if the button is held for the correct amount of time
  if (pressLength_milliSeconds >= optionTwo_milliSeconds){

    digitalWrite(ledPin_Option_4, HIGH); 
    delay(100);              // wait for a 10th second 
    digitalWrite(ledPin_Option_4, LOW);    

  } 

  //option 3 - Execute the first option if the button is held for the correct amount of time
  else if(pressLength_milliSeconds >= optionOne_milliSeconds){

    digitalWrite(ledPin_Option_3, HIGH); 
    delay(100);              // wait for a 10th second 
    digitalWrite(ledPin_Option_3, LOW); 

  }//close if options


  //every time through the loop, we need to reset the pressLength_Seconds counter
  pressLength_milliSeconds = 0;

} // close void loop

i added more “pressLength_milliSeconds” options but that hasn’t solved the issue, which is, both pin 5 and 9 fire if button 1 or button 2 is pressed for 100ms and 6 & 10 if button 1 or 2 is held for more than 500ms

here is the code as it stands

/////////Declare and Initialize Variables////////////////////////////

//We need to track how long the momentary pushbutton is held in order to execute different commands
//This value will be recorded in seconds
float pressLength_milliSeconds = 0;

// Define the *minimum* length of time, in milli-seconds, that the button must be pressed for a particular option to occur
int optionOne_milliSeconds = 100;
int optionTwo_milliSeconds = 500;
int optionThree_milliSeconds = 100;
int optionFour_milliSeconds = 500;        

//The Pin your button is attached to
int buttonPin1 = 15;
int buttonPin2 = 16;
int buttonPin3 = 17;
int buttonPin4 = 18;

//Pin your LEDs are attached to
int ledPin_Option_1 = 5;
int ledPin_Option_2 = 6;
int ledPin_Option_3 = 9;
int ledPin_Option_4 = 10;
int ledPin_Option_5 = 11;
int ledPin_Option_6 = 12;

void setup(){

  // Initialize the pushbutton pin as an input pullup
  // Keep in mind, when pin 2 has ground voltage applied, we know the button is being pressed
  pinMode(buttonPin1, INPUT_PULLUP); 
  pinMode(buttonPin2, INPUT_PULLUP);
  pinMode(buttonPin3, INPUT_PULLUP);
  pinMode(buttonPin4, INPUT_PULLUP);
      

  //set the LEDs pins as outputs
  pinMode(ledPin_Option_1, OUTPUT); 
  pinMode(ledPin_Option_2, OUTPUT);
  pinMode(ledPin_Option_3, OUTPUT); 
  pinMode(ledPin_Option_4, OUTPUT);  

  //Start serial communication - for debugging purposes only
  Serial.begin(9600);                                     

} // close setup


void loop() {

  //Record *roughly* the tenths of seconds the button in being held down
  while (digitalRead(buttonPin1) == LOW ){ 

    delay(100);  //if you want more resolution, lower this number 
    pressLength_milliSeconds = pressLength_milliSeconds + 100;   

    //display how long button is has been held
    Serial.print("ms = ");
    Serial.println(pressLength_milliSeconds);

  }
    while (digitalRead(buttonPin2) == LOW ){ 

    delay(100);  //if you want more resolution, lower this number 
    pressLength_milliSeconds = pressLength_milliSeconds + 100;   

    //display how long button is has been held
    Serial.print("ms = ");
    Serial.println(pressLength_milliSeconds);

  }//close while


  //Different if-else conditions are triggered based on the length of the button press
  //Start with the longest time option first

   //Option 4 - Execute the second option if the button is held for the correct amount of time
  if (pressLength_milliSeconds >= optionFour_milliSeconds){

    digitalWrite(ledPin_Option_4, HIGH); 
    delay(100);              // wait for a 10th second 
    digitalWrite(ledPin_Option_4, LOW);    

  } 

  //option 3 - Execute the first option if the button is held for the correct amount of time
  else if(pressLength_milliSeconds >= optionThree_milliSeconds){

    digitalWrite(ledPin_Option_3, HIGH); 
    delay(100);              // wait for a 10th second 
    digitalWrite(ledPin_Option_3, LOW); 

  }
  
  //Option 2 - Execute the second option if the button is held for the correct amount of time
  if (pressLength_milliSeconds >= optionTwo_milliSeconds){

    digitalWrite(ledPin_Option_2, HIGH); 
    delay(100);              // wait for a 10th second 
    digitalWrite(ledPin_Option_2, LOW);    

  } 

  //option 1 - Execute the first option if the button is held for the correct amount of time
  else if(pressLength_milliSeconds >= optionOne_milliSeconds){

    digitalWrite(ledPin_Option_1, HIGH);
    delay(100);              // wait for a 10th second 
    digitalWrite(ledPin_Option_1, LOW);  

  }
  
 //close if options


  //every time through the loop, we need to reset the pressLength_Seconds counter
  pressLength_milliSeconds = 0;

} // close void loop

i’m new so i’m confused as to what I’m doing wrong or just not doing right.

thanks so much