Added code for comparison with baseline before optimizing