initial functionality of singly linked list