adding filters and flash messages