return a useful function from require()