refactor setup of content rules