began writing class functions for clustering algorithm