worked out basic flow for the kmeans analyzer.