Refined functions for applying filters