Abstract: Gamma5 is notoriously difficult to define in D dimensions. The traditional BMHV scheme goes back to the earliest proposals by 't Hooft and Veltman and employs a non-anticommuting gamma5. Its advantage is full mathematical consistency and the existence of all-order proofs. Its disadvantage is the spurious breaking of gauge invariance in chiral gauge theories like the electroweak standard model. In our research programme we determine the required finite counterterms needed to restore gauge invariance, to allow more straightforward applications of the BMHV scheme in future practical calculations in the EWSM and beyond. In the talk we will first present the key ideas: definition of the problem and pedagogical explanations of breaking/restoration of gauge invariance. Then we outline the current status: the 2-loop and 3-loop treatment of an abelian chiral gauge theory like the U(1) sector of the EWSM, and the 1-loop treatment of a general Yang-Mills theory with fermionic and scalar matter.