help with my program

I would like to know if there is anything wrong in my code. My programm works but not well, for example when the state changes from buttonPin2==HIGH to buttonPin3== HIGH the led1 does not turn off inmediatly, it starts blinking for a few second and then turns off.

const int buttonPin2 = 7;
const int led1 = 1;
const int led2 = 10;
const int led3 = 9;
const int buttonPin3 = 6;

void setup() {

pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(buttonPin2, INPUT);
pinMode(buttonPin3, INPUT);
}
void loop() {

if (digitalRead(buttonPin2) == HIGH) {

digitalWrite(led1, HIGH);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);

}
else if (digitalRead(buttonPin3) == HIGH ) {
digitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
digitalWrite(ledPin3, LOW);

delay(1000);

digitalWrite(led2, LOW);
digitalWrite(led1, LOW);
digitalWrite(led3, HIGH);
delay(1000);

}
else{
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
}
}

You didn't say how pins 2 & 3 are wired up.

Try changing these
pinMode(buttonPin2, INPUT);
pinMode(buttonPin3, INPUT);
to
pinMode(buttonPin2, INPUT_PULLUP); // input with internal pullup resistor enabled
pinMode(buttonPin3, INPUT_PULLUP);

and wire your buttons to connect them to GND when pressed.
Then look for a low at these lines:
if (digitalRead(buttonPin2) == HIGH) { // change to LOW

else if (digitalRead(buttonPin3) == HIGH ) { // change to LOW

thanks!! The problem was solved with a pull up resistor