event queue and worker threads work (?). need to figure out where to declare these globals