added avg number of resonances as a command line input value