refactoring line numbers menu selection