updated rule.js file