Sleep now lets us fill the queue faster than it is emptied
made member functions global functions