private static int getUserOption(BufferedReader br, int min, int max) {
        int opt;
        while (true) {
            try {
                opt = Integer.parseInt(br.readLine());
                if (opt >= min && opt <= max) {
                    break;
                } else {
                    System.out.println("Introduce valid option");
                }
            } catch (Exception e) {
                System.out.println("Introduce valid option");
            }
        }
        return opt;
    }