works now w/v3.0 of datastructs.h

uses globals.h (global queue)