refactored singly linked lists