mathematica notebook modified. checked with fun.m identical