Added logic for filtering