filtering function declaration