merge viewer and generator