Refactored and updated rule.