display all element of the list, handles input