added automatically choosing number of cluster