refactory with mini cluster