grossly finished the analysis. Have to check how the output will look like.