Added before method to the filter