add a figure of queue logic