wokring of task2, just left in LinkedList.c the releasing memory