altered the main and divided the menu method into two methods.