added rule.java