updated how menu is shown and hidden