Changed mergeRules to a protected method