changed structure of menu to try for smooth menu animation on mobile