need to change all this up and use fns from list.c