added trim to minimize false positives in rule implementations