moved linked list code into its own file