compute centroid is not working. what i have so far.