it works

the problem was i put the wrong pointer in the printList method