making the queue code a little bit less stupid, but it still might be stupid.