improved script to make histogram from several runs