outsourced global variables into a struct globals.*