Use a non-deprecated way for filter