Adding rules for model