updated to cope with pythia