changed the rest of the program to use dlist