added const to gvars