functioning real time queue
improved accuracy of queue and clear