Added if else statement