removing unused function from linked list program