update the before filter