hide menus logic