clean the code, run only ntuples needed