delay command not recognized

I am controlling two pairs of relays to drive a DC motor forwards and backwards.

When I insert a delay between the commands to the relays, the delay is not recognized and the relays simultaneously are activated where I want their activation separated by the delay. Not sure why this is happening. Help please?

// relay test
int motorPinCW1 = 10;
int motorPinCW2 = 9;
int motorPinCCW1 = 8;
int motorPinCCW2 = 7;

void setup(){
  pinMode(motorPinCW1, OUTPUT);
  pinMode(motorPinCW2, OUTPUT);
  pinMode(motorPinCCW1, OUTPUT);
  pinMode(motorPinCCW2, OUTPUT);

  digitalWrite(motorPinCW1, LOW);
  digitalWrite(motorPinCW2, LOW);
  digitalWrite(motorPinCCW1, LOW);
  digitalWrite(motorPinCCW2, LOW);
}
void loop(){
  digitalWrite(motorPinCW1, HIGH);
  digitalWrite(motorPinCW2, HIGH);  
  delay(5000);
  digitalWrite(motorPinCW1, LOW);
  digitalWrite(motorPinCW2, LOW);
//need delay here

  digitalWrite(motorPinCCW1, HIGH);
  digitalWrite(motorPinCCW2, HIGH);
  delay(5000);
  digitalWrite(motorPinCCW1, LOW);
  digitalWrite(motorPinCCW2, LOW);
  //need delay here
  
}

thanks, jim

If delay() works between setting the pins HIGH and setting them LOW, then delay() will work between setting one set LOW and another set HIGH.

If the first delay() doesn't appear to work, you need to provide some evidence that that is the case.