Added code to analyze results