Added test case to validate same results with new implementation and to correct bug when results differ.