refactoring EvalTemplate