add queue logic