document filter method