this mirrors the async.forEach functionality but for the table case.