Added more functions for K-Means Indexing