ESP8266 problem with Serial AT commands

Hi guys,
I am trying to communicate with my ESP8266-07 through Arduino Nano Serial. I am using AT commands to reset, connect wifi, connect TCP server and so on. I have got one functional script, so i know that ESP8266 is wired correctly. I am using 3.3V to 5V logic converter and so on... This is the older functional script:

void esp_connect() {
  Serial.println("AT+RST");
  delay(2);
  esp_timefuse = millis();
  while(Serial.find("ready") == false) {
  if(esp_timefuse - millis() >= 5000) 
    esp_connect();
  }  
  
  Serial.println("AT+CWMODE=3");
  delay(2);
  esp_timefuse = millis();
  while(Serial.find("OK") == false) {
    if(esp_timefuse - millis() >= 2000) 
      esp_connect();
  }

  Serial.println("AT+CWJAP=\"WiFi 7-pekiel\",\"43664366\"");
  delay(2);
  esp_timefuse = millis();
  while(Serial.find("OK") == false) {
    if(esp_timefuse - millis() >= 2000) 
      esp_connect();
  } 
  
  Serial.println("AT+CIPMUX=1");
  delay(2);
  esp_timefuse = millis();
  while(Serial.find("OK") == false) {
    if(esp_timefuse - millis() >= 2000) 
      esp_connect();
  } 

  Serial.println("AT+CIPSTART=0,\"TCP\",\"10.10.10.6\",3600");
  delay(2);
  esp_timefuse = millis();
  while(Serial.find("OK") == false) {
    if(esp_timefuse - millis() >= 2000) 
      esp_connect();
  } 
}

But I am not satisfied with it. I am trying to do it best. So i wrote this script:

void esp_connect() {
  Serial.println("AT+RST");
  Serial.flush();
  Serial.setTimeout(5000);
  if(Serial.find("ready")); 
  else esp_connect();
  
  Serial.println("AT+CWMODE=3");
  Serial.flush();
  Serial.setTimeout(2000);
  if(Serial.find("OK")); 
  else esp_connect();


  Serial.println("AT+CWJAP=\"WiFi 7-pekiel\",\"43664366\"");
  Serial.flush();
  if(Serial.find("OK")); 
  else esp_connect();
  
  Serial.println("AT+CIPMUX=1");
  Serial.flush();
  if(Serial.find("OK")); 
  else esp_connect();

  Serial.println("AT+CIPSTART=0,\"TCP\",\"10.10.10.6\",3600");
  Serial.flush();
  if(Serial.find("OK")); 
  else esp_connect();
}

When I am testing this new script through Serial monitor everything works. I am simulating ESP8266 so I just type "OK" and "OK" just like ESP8266. But when I connect it to ESP8266 nothing works. Where is the Mistake in my script? Is my usage of Serial.find() correct?