prepare the code for breit wigner analysis
general code improvement