Added check to call create or update respectively. Removed rulebase check.