should we force the function to take a linked list?