random generator refactored; menu added;