Trying to add the ability to switch channels in my mask but material not showing up correctly.

Hi there

I am trying to create a base material with as many features as possible. A key feature I want to include in master material is the ability to switch channels when the RGB mask was not as per our standard, for example R=AO, B=R, G = M but the mask was in fact created as R=R, G=M, B=AO.

I think I have figured it out but I don’t think the actual MASK is having any effect on the actual material. Can you please take a look at my master material setup and tell me what I might be doing wrong?

I can really do with some help here. Thanks!