updated list with sort function