total rewrite of queueing helper