begin refactor clustering