modified newmarkermode to work with clusters