modified list.c and list.h