refactoring singly linked list api, and finish its test case