add list and sort functions