implement ruleModel
merge rulemodel and treemodel