Filter function added to most views