refactor queue_get_all