refactors rules to be a part of ruleset, as intended