added new option in main menu, refactoring, javadoc