this function put the menu on the console You can edit the before and the after function as you like to be compatible with your program