adding tree structure to object event handling