fixed incorrect argument assignment in centroid method