split code for common and cluster/single-specific