making the provider use the new anti-global pattern
new pattern for providers