using listeners on tree to detect changes