private void parse() {
            try {
                for (int i = 0; i < args.length; ++i) {
                    if ("-h".equals(args[i])) {
                        help = true;
                    } else if ("-nr-nodes".equals(args[i])) {
                        numberOfNodes = Integer.parseInt(args[++i]);

                        if (numberOfNodes < NR_NODES) {
                            System.err.println("Number of nodes must be greater or equal to " + NR_NODES);
                            System.exit(1);
                        }
                    } else if ("-nr-messages".equals(args[i])) {
                        numberOfMessages = Integer.parseInt(args[++i]);

                        if (numberOfMessages <= 0) {
                            System.err.println("Number of messages must be greater than 0");
                            System.exit(1);
                        }
                    } else if ("-config".equals(args[i])) {
                        config = args[++i];
                    } else {
                        System.err.println("Unknown argument: " +args[i]);
                        helpAndExit();
                    }
                }
            } catch (Throwable t) {
                System.err.println("Error processing arguments: " + t.getMessage());
                t.printStackTrace();
                System.exit(1);
            }
        }