Revised part of the trick-or-treat algorithm (TM)