slight API improvement to BasicDoFn