introduce "mode" to distinguish between "merge" and "backfill"