Altered filter generation function