insert result in CalculateMarginals.py