slightly changed queuing