Changed the rule to comply with new api