pack global variables in structs