DRYer filterfunc