generator and ntuplizer