finish mathematica server side.