added event system to tree