add some comments to the menu function