segregation and merge of custom rules