modularized get cluster function

modular