found a function that returns a function