making mods to have singly, doubly linked lists and account for dummy head nodes and allow for custom input funtions in the data type of the list