singly linked list with proper indentation