store rules in local storage