Adding the if statement