Added mathematica code