giving phi function control over input collection and evaluation