added itemclick function, called when node is clicked