Updated implementation of IFunction