added functionality for filtering