implement filter and filterNot