move call of trigfunc into MathClass