factored main menu