implements the analysis

also documents the process and the output file.