work on list and queue