add calc.pl and calc.t