changed get_queue to get_list and words from queue to list