aesthetic changes, building centroid subroutines