Forked addSubMenu() function