move the scope of functional generators to global