moved reformed global (sorry) into the func