added an if else statement
added an if else statment