added documentation, and examples for filter