Light and pir sensor triggers

i want to make project that can turn on light when LDR sensor sense specific amount of light, then turn on the PIR Sensor, then PIR Sensor when sense someone can turn on the light.

here is my code:

#define LDR 0
#define PIR 2
#define LED 3

int pirState;
int ldrValue;

void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
pinMode(PIR, INPUT);
digitalWrite(LED, LOW);
}

void loop(){
ldrValue = analogRead(LDR);
//Serial.print("Analog reading = ");
Serial.println(ldrValue);

if (ldrValue <200)
digitalWrite(PIR, HIGH);
pirState = digitalRead(PIR);
if (pirState == HIGH) {
digitalWrite(LED, HIGH);
delay(2000);
digitalWrite(LED, LOW);
delay(1000);
}
else { //pirState == LOW
digitalWrite(LED, LOW);
}
}

Problem is that this code, Pir sensor always turn on the light no matter if i put value: if (ldrValue <200)

can someone help to correct the code?

Solved, the code is:

#define LDR 0
#define PIR 2
#define LED 3

int pirState;
int ldrValue;

void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
pinMode(PIR, INPUT);
digitalWrite(LED, LOW);
}

void loop(){
int ldrValue = analogRead(LDR);
Serial.print("Analog reading = ");
Serial.println(ldrValue);

if (ldrValue <200)
{
digitalWrite(PIR, HIGH);
pirState = digitalRead(PIR);
if (pirState == HIGH) {
digitalWrite(LED, HIGH);
delay(2000);
digitalWrite(LED, LOW);
delay(1000);
}
else
{
digitalWrite(LED, LOW);
}
}
}