readFile, computeSpin, clusterExtraction added, but not tested