Fix bug (initialize newcentroid inside loop) and record centroid history
Read centroidshistory