improving the behavior of the main menu