computation of centroid means has been implemented.