fianlize clustering