added linked list code