doubly linkedlist fix

added printing functions and and fix for head