IF command implementation