added matrix transformation and more debugging prints to make_results.py