cluster number refactoring

improved refactoring of cluster numbering.