integrated kmeans.py into pipeline