add list function for queues