adding another version to add nodes to end of a linked lists