implemented GUI functionality for navigating through menus.