reduce a global var