public String next() {
            if (cmds.size() == 0) {
                return null;
            }
            if (cursor < cmds.size() - 1) {
                cursor++;
            }
            return cmds.get(cursor);
        }