switched queue to list implementation