add documentation for filter method