Changed to an if else statement