use head to pass node between funciton calls