Modified some of the code. Still need to modify A3 so that the statistics from loganalizer are recorder correctly in the output