public static void main(String[] args) {
        // more than 0 args: try to parse 1st as a port
        if (args.length > 0) {
            try {
                int port = Integer.parseInt(args[0]);
                if (port < 1024) {
                    System.out.println("Invalid port:" + port);
                    new GroupServer();
                } else {
                    new GroupServer(port);
                }
            } catch (NumberFormatException e) {
                System.out.println("invalid port: " + args[0]);
                new GroupServer();
            }
        } else {
            // 0 args: use default port
            new GroupServer();
        }
    }