queue must be global.