add Rule parser code, RuleThreshold fixes