refactor cluster package