the combining function now has parameters specific to datasets