walk tree mthod used for 'to hash' test