completed centroid modifications... tested and appears to be functional