added initial code for k-means clustering using triples