minor changes to menu function