Some Mathematica code