change constructor parameter from enum Calc to function Func