Replace AFunction by IFunction