Implemented templateCondition. mc_calc5.xml working