implementing linked list fundamental operations