Added a generator to the Queue class