change centroid setter to object to avoid errors