Refactorize, extract a method so the finding of the rules can be
customized