Sub Menus

Hello everyone.
Im having trouble using sub-menus.

I am using glutChangeToSubMenu() to change the sub menu.
But the old sub-menu is not getting replaced.

Can anyone please help?

Thanks in advance.