Added if function.