prep for centroid displacement calculations
debug writeline, add more plots