linked list functions
not sure which commit this is