works ok! TODO add kmeans