categories menu logic