adding hierarchical menu and contextmenu