This references shiftFilter, but I don't see a definition for shiftFilter above.  Is this supposed to be finalFilter which is defined on line 384?