adding function in linkedlist.h