Validated with if statements

Validated with if statements