moved centroid into static method / updted build script