Encode rules and adopt a new approach