make script easier to read, add passed in lepton flavor parameter