implemented a linkedlist