update the hash when clicking on a node