started workign on code to find centroid