private void printTable() {
        // header
        for (int i = 0; i < 65; i++) {
            System.out.print("-");
        }
        System.out.println();
        System.out.print("| " + padRight("ip", 15) + " ");
        System.out.print("| " + padRight("mac", 17)  + " ");
        System.out.print("| " + padRight("name", 10) + " ");
        System.out.print("| " + padRight("time", 5) + " ");
        System.out.println("| " + padRight("dr", 2) + " |");
        for (int i = 0; i < 65; i++) {
            System.out.print("-");
        }
        System.out.println();


        Map<Integer, List<String>> rows = new TreeMap<>();
        for (int i = 0; i <= 10; i++) {
            rows.put(i, new ArrayList<String>());
        }

        for (Map.Entry<User, List<Long>> entry : users.entrySet()) {
            User user = entry.getKey();
            List<Long> timestamps = entry.getValue();

            if (timestamps.isEmpty()) {
                continue;
            }

            long time = getTimeFromLast(timestamps);
            int missed = getCountMissed(timestamps);

            String row = "";
            row += ("| " + padRight(user.ip, 3 * 4 + 3) + " ");
            row += ("| " + padRight(user.mac, 2 * 6 + 5)  + " ");
            row += ("| " + padRight(user.name, 10) + " ");
            row += ("| " + padRight(String.valueOf(time), 5) + " ");
            row += ("| " + padRight(String.valueOf(missed), 2) + " |");
            rows.get(missed).add(row);
        }
        for (int i = 0; i <= 10; i++) {
            for (String row : rows.get(i)) {
                System.out.println(row);
            }
        }

        for (int i = 0; i < 65; i++) {
            System.out.print("-");
        }
        System.out.println();
    }