events for clicking on nodes