travel function recursively moves up the linked list
with each recursive call travel calls the call back