How do you pass that unsorted list to the function so that it can get the last element.