added changes to ntuple making code