Adding rules and entity