added linkedList function