implementing a linked-list
control flow creates a linked list.