added interactivity to tree diagram