implemented if directive.