Debugged and ran on all datasets.