Adding the if function.