Two buttons, 4 LEDs and timing

Hi,

I have this project where i have two pushbuttons connected to the arduino and 4 LED, 2 red and 2 green. 1 red and 1 green for each button.

The thing is that the 2 red leds are light up at the beggining and when i press either of the buttons the corresponding green led must blink.

If i press both of the buttons in an interval of around 250ms (to simulate simultaneously press) i want the green leds to blink 2-3 times and then stay light while the red leds to be off.

I figured it out in only one case: when the first button starts the timer and if the second button is pressed within 250 ms it does what i want, but if i do it the other way around it wont work.

Can you please help me with this/.

I have this code so far:

const int buttonPin = 2;
const int buttonPin1 = 3; // the number of the pushbutton pin
const int ledPin = 13;
const int ledPinG = 4;

// variables will change:
int buttonState = 0;
int buttonState1 = 0;// variable for reading the pushbutton status

unsigned long timer1;
unsigned long timer2;

void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
pinMode(ledPinG, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
pinMode(buttonPin1, INPUT);

}

void ledBlink(int pin, int howlong){
digitalWrite(ledPin, LOW);
for (int i = 0; i < howlong; i++) {
digitalWrite(pin, HIGH);
delay(150);
digitalWrite(pin, LOW);
delay(150); }
digitalWrite(ledPin, HIGH);
}

void loop() {
// read the state of the pushbutton value:

buttonState = digitalRead(buttonPin);
buttonState1 = digitalRead(buttonPin1);

if(buttonState == HIGH){
timer1 = millis();
ledBlink(ledPinG, 3);

}
if(buttonState1 == HIGH){
timer2 = millis();
if(timer2-timer1 > 250){
ledBlink(ledPinG, 3);

} else{ digitalWrite(ledPinG, HIGH);
digitalWrite(ledPin, LOW);}
}

}