added linked list functions