moved global static inside method