sub menu logic written