added functionality to kmeans.java

to support real data