linked list and test cases