added bi-kmeans function