Correctly encode rule 4