Finished getCentroid