make menu to support sub-menu; some api docs update