added missing variable declarations in traverse()