linked list traversal, insert at head and delete