added hierarchical menu support