cluster setup refactoring