write a generic cluster module